#ifndef SERVICE_IMPL_H
#define SERVICE_IMPL_H

#include "service.h"
#include "servicedao_file_impl.h"
#include "servicedao.h"

class ServiceImpl:public Service
{
	Servicedao* m_pDao;
	vector <Department> m_vecDepts;
public:
	ServiceImpl(void)
	{
		m_pDao = new ServiceDaoFileImpl;
		m_pDao->load(m_vecDepts);
	}
	~ServiceImpl()
	{
		m_pDao->save(m_vecDepts);
		delete m_pDao;
	}
	void addDept(void);
	void deleteDept(void);
	void listDept(void);
	void addEmp(void);
	void deleteEmp(void);
	void modifyEmp(void);
	void listEmp(void);
	void listAllEmp(void);
};
#endif// SERVICE_IMPL_H
